package edu.spec.wfl.week09.class2.classroom;

public class Student {
    private String name;
    private String number;

    public Student(){

    }

    public Student(String name, String number) {
        this.name = name;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public void study(int i) throws Exception {
        if (i==5){
            Exception e=   new Exception("周五罢学");
            throw  e;
        }
        System.out.println("好好学习，天天向上");
    }
}
